<?php
defined('SEJUJOPEFDNGJSL') or exit('Access denied');
$jjlevel=array('普通','创业董事','联席董事','首席董事');
if($_POST['act']=='edit'){
	$userid=$_POST['userid'];
	$edid=$_POST['edid'];
	$arr['real_name']=trim($_POST['username']);
	foreach ($_POST['ptd'] as $k => $v) {
		teditinfo($v,trim($_POST[$v]),$arr);
	}
	if(trim($_POST['rgpwd1'])){
		$p1=chkpwd(array(trim($_POST['rgpwd1'])));
		if($p1!='true'){
			a_bck('密码不能小于8位');
			exit;
		}
		$arr['rgpwd1']=getpwd(trim($_POST['rgpwd1']));
	}
	if(trim($_POST['rgpwd2'])){
		$p2=chkpwd(array(trim($_POST['rgpwd2'])));
		if($p2!='true'){
			a_bck('密码不能小于8位');
			exit;
		}
		$arr['rgpwd2']=getpwd(trim($_POST['rgpwd2']));
	}
	$sql=getupdatesql($arr,'ld_user_info',' id='.$edid,'mbq,sex');
	$db->sitedbexec($sql);
	if(intval($_POST['user_level'])>=0 && intval($_POST['user_level'])<=7){
		$sql0 = "update ld_user_account set user_level = ".intval($_POST['user_level'])." where uname = '".$userid."'";
		$db->sitedbexec($sql0);
	}
	if(intval($_POST['user_jjlever'])>=0 && intval($_POST['user_jjlever'])<=4){
		$req = "update ld_user_account set user_jjlever = ".intval($_POST['user_jjlever'])." where uname = '".$userid."'";
		$db->sitedbexec($req);
	}
	if(floatval(trim($_POST['pluscash'])) > 0 && floatval(trim($_POST['minuscash'])) > 0){
		a_bck('增加和减小操作不能同时进行');
		exit;
	}
	if(floatval(trim($_POST['pluscash'])) > 0){
		$sql1 = "update ld_user_account set cash_purse = cash_purse + ".floatval(trim($_POST['pluscash']))." where uname = '".$userid."'";
		$db->sitedbexec($sql1);
		$db->sitedbexec("INSERT INTO ld_coin_record VALUES('',2,".floatval(trim($_POST['pluscash'])).",".time().",'".$_username."',1,'".$userid."')");
	}elseif(floatval(trim($_POST['minuscash'])) > 0){
		$sql1 = "update ld_user_account set cash_purse = cash_purse - ".floatval(trim($_POST['minuscash']))." where uname = '".$userid."'";
		$db->sitedbexec($sql1);
		$db->sitedbexec("INSERT INTO ld_coin_record VALUES('',2,".floatval(trim($_POST['minuscash'])).",".time().",'".$_username."',2,'".$userid."')");
	}
	if(floatval(trim($_POST['plusldprize'])) > 0 && floatval(trim($_POST['minusldprize'])) > 0){
		a_bck('增加和减小操作不能同时进行');
		exit;
	}
	if(floatval(trim($_POST['plusldprize'])) > 0){
		$sql1 = "update ld_user_account set keyong_ldprize = keyong_ldprize + ".floatval(trim($_POST['plusldprize']))." where uname = '".$userid."'";
		$db->sitedbexec($sql1);
		$db->sitedbexec("INSERT INTO ld_coin_record VALUES('',3,".floatval(trim($_POST['plusldprize'])).",".time().",'".$_username."',1,'".$userid."')");
	}elseif(floatval(trim($_POST['minusldprize'])) > 0){
		$sql1 = "update ld_user_account set keyong_ldprize = keyong_ldprize - ".floatval(trim($_POST['minusldprize']))." where uname = '".$userid."'";
		$db->sitedbexec($sql1);
		$db->sitedbexec("INSERT INTO ld_coin_record VALUES('',3,".floatval(trim($_POST['minusldprize'])).",".time().",'".$_username."',2,'".$userid."')");
	}
	//开始增加
	if(floatval(trim($_POST['pluslixi'])) > 0){
		$sql1 = "update ld_user_account set lixi_crash = lixi_crash + ".floatval(trim($_POST['pluslixi']))." where uname = '".$userid."'";
		$db->sitedbexec($sql1);
		$db->sitedbexec("INSERT INTO ld_coin_record VALUES('',4,".floatval(trim($_POST['pluslixi'])).",".time().",'".$_username."',1,'".$userid."')");
	}elseif(floatval(trim($_POST['minuslixi'])) > 0){
		$sql1 = "update ld_user_account set lixi_crash = lixi_crash - ".floatval(trim($_POST['minuslixi']))." where uname = '".$userid."'";
		$db->sitedbexec($sql1);
		$db->sitedbexec("INSERT INTO ld_coin_record VALUES('',4,".floatval(trim($_POST['minuslixi'])).",".time().",'".$_username."',2,'".$userid."')");
	}
	//晋级
	if(floatval(trim($_POST['plusjinji'])) > 0){
		$sql1 = "update ld_user_account set btc_account = btc_account + ".floatval(trim($_POST['plusjinji']))." where uname = '".$userid."'";
		$db->sitedbexec($sql1);
		$db->sitedbexec("INSERT INTO ld_coin_record VALUES('',5,".floatval(trim($_POST['plusjinji'])).",".time().",'".$_username."',1,'".$userid."')");
	}elseif(floatval(trim($_POST['minusjinji'])) > 0){
		$sql1 = "update ld_user_account set btc_account = btc_account - ".floatval(trim($_POST['minusjinji']))." where uname = '".$userid."'";
		$db->sitedbexec($sql1);
		$db->sitedbexec("INSERT INTO ld_coin_record VALUES('',5,".floatval(trim($_POST['minusjinji'])).",".time().",'".$_username."',2,'".$userid."')");
	}
	//jifen
	if(floatval(trim($_POST['plusjifen'])) > 0){
		$sql1 = "update ld_user_account set ltc_account = ltc_account + ".floatval(trim($_POST['plusjifen']))." where uname = '".$userid."'";
		$db->sitedbexec($sql1);
		$db->sitedbexec("INSERT INTO ld_coin_record VALUES('',6,".floatval(trim($_POST['plusjifen'])).",".time().",'".$_username."',1,'".$userid."')");
	}elseif(floatval(trim($_POST['minusjifen'])) > 0){
		$sql1 = "update ld_user_account set ltc_account = ltc_account - ".floatval(trim($_POST['minusjifen']))." where uname = '".$userid."'";
		$db->sitedbexec($sql1);
		$db->sitedbexec("INSERT INTO ld_coin_record VALUES('',6,".floatval(trim($_POST['minusjifen'])).",".time().",'".$_username."',2,'".$userid."')");
	}
	//共享积分
	if(floatval(trim($_POST['plusdfc'])) > 0){
		$sql1 = "update ld_user_account set fuxiao_crash = fuxiao_crash + ".floatval(trim($_POST['plusdfc']))." where uname = '".$userid."'";
		$db->sitedbexec($sql1);
		$db->sitedbexec("INSERT INTO ld_coin_record VALUES('',7,".floatval(trim($_POST['plusdfc'])).",".time().",'".$_username."',1,'".$userid."')");
	}elseif(floatval(trim($_POST['minusdfc'])) > 0){
		$sql1 = "update ld_user_account set fuxiao_crash = fuxiao_crash - ".floatval(trim($_POST['minusdfc']))." where uname = '".$userid."'";
		$db->sitedbexec($sql1);
		$db->sitedbexec("INSERT INTO ld_coin_record VALUES('',7,".floatval(trim($_POST['minusdfc'])).",".time().",'".$_username."',2,'".$userid."')");
	}
	//开始减少
	if(intval(trim($_POST['plusactive'])) > 0 && intval(trim($_POST['minuactive'])) > 0){
		a_bck('增加和减小操作不能同时进行');
		exit;
	}
	if(intval(trim($_POST['plusactive'])) > 0){
		$sql2 = "update ld_user_account set active_coin = active_coin + ".intval(trim($_POST['plusactive']))." where uname = '".$userid."'";
		$db->sitedbexec($sql2);
		$db->sitedbexec("INSERT INTO ld_coin_record VALUES('',0,".floatval(trim($_POST['plusactive'])).",".time().",'".$_username."',1,'".$userid."')");
	}elseif(intval(trim($_POST['minuactive'])) > 0){
		$sql2 = "update ld_user_account set active_coin = active_coin - ".intval(trim($_POST['minuactive']))." where uname = '".$userid."'";
		$db->sitedbexec($sql2);
		$db->sitedbexec("INSERT INTO ld_coin_record VALUES('',0,".floatval(trim($_POST['minuactive'])).",".time().",'".$_username."',2,'".$userid."')");
	}
	if(intval(trim($_POST['plushelp'])) > 0 && intval(trim($_POST['minuhelp'])) > 0){
		a_bck('增加和减小操作不能同时进行');
		exit;
	}
	if(intval(trim($_POST['plushelp'])) > 0){
		$sql3 = "update ld_user_account set give_help_coin = give_help_coin + ".intval(trim($_POST['plushelp']))." where uname = '".$userid."'";
		$db->sitedbexec($sql3);
		$db->sitedbexec("INSERT INTO ld_coin_record VALUES('',1,".floatval(trim($_POST['plushelp'])).",".time().",'".$_username."',1,'".$userid."')");
	}elseif(intval(trim($_POST['minuhelp'])) > 0){
		$sql3 = "update ld_user_account set give_help_coin = give_help_coin - ".intval(trim($_POST['minuhelp']))." where uname = '".$userid."'";
		$db->sitedbexec($sql3);
		$db->sitedbexec("INSERT INTO ld_coin_record VALUES('',1,".floatval(trim($_POST['minuhelp'])).",".time().",'".$_username."',2,'".$userid."')");
	}
	$xfb_address=trim($_POST['xfb_address']);
	$bgy_address=trim($_POST['bgy_address']);
	$db->query("update ld_user_account set xfb_address='".$xfb_address."',bgy_address='".$bgy_address."' where uname = '".$userid."' ",4);
	record_log('修改'.$userid.'会员资料');
	show_automsg('修改成功！',YMCURL.'formallist');
}

$edid=getnums($_GET['edid'],0);
//防止非admin管理员通过改链接edid改admin资料
// if($_username!=='tianxiayhe'&&$edid==8501){
//     show_automsg('找不到此会员！',YMCURL.'formallist',1);
// }
//用户信息ld_user_info ld_user_account
$rs=$member->getuserinfo($edid);
if(empty($rs)){
	show_automsg('找不到此会员！',YMCURL.'formallist',1);
}
$sql="select * from ld_regconfig where show_when_reg=0 order by id_number asc";
$db->query($sql);
$rr=$db->rs;

$rgform=getregform(array('mbq'=>$rs['mbq']));
?>
<h3>修改资料</h3>
<div class="main-r-body">
	<form name="theform" method="post" action="<?php echo geturl(); ?>" onsubmit="return validate()">
		<div class="main-r-item">
			<a href="<?php echo YMCURL;?>formallist" class="thabtn">返回正式会员列表</a>
			<input type="submit" class="thabtn" value="提交" onclick="theform.onsubmit();">
		</div>
		<input type="hidden" name="act" value="edit">
		<input type="hidden" name="edid" value="<?php echo $rs['id'];?>">
		<input type="hidden" name="userid" value="<?php echo $rs['uname'];?>">
		<table class="tregtab ttab">
			<tr>
				<td class="wdb20 alignr paddingr">会员账号</td>
				<td class="alignl paddingl"><?php echo $rs['uname'];?></td>
			</tr>
			<?php if(is_array($GLOBALARR['jjname'])){ ?>
				<tr>
					<td class="wdb20 alignr paddingr">级别</td>
					<td class="alignl paddingl">
						<select name="user_level">
							<?php foreach($GLOBALARR['jjname'] as $key=>$val){ ?>
								<option value="<?php echo $key; ?>" <?php echo $rs['user_level']==$key ? "selected='selected'" : "" ?>><?php echo $GLOBALARR['jjname'][$key];?></option>
							<?php } ?>
						</select>

					</td>
				</tr>
			<?php
			}
			?>
			<?php if(is_array($jjlevel)){ ?>
				<tr>
					<td class="wdb20 alignr paddingr">晋级级别</td>
					<td class="alignl paddingl">
						<select name="user_jjlever">
							<?php foreach($jjlevel as $key=>$val){ ?>
								<option value="<?php echo $key; ?>" <?php echo $rs['user_jjlever']==$key ? "selected='selected'" : "" ?>><?php echo $jjlevel[$key];?></option>
							<?php } ?>
						</select>

					</td>
				</tr>
			<?php
			}
			?>
			<tr>
				<td class="wdb20 alignr paddingr">注册日期</td>
				<td class="alignl paddingl"><?php echo formatdate($rs['regist_time']);?></td>
			</tr>
			<tr>
				<td class="wdb20 alignr paddingr">激活日期</td>
				<td class="alignl paddingl"><?php echo formatdate($rs['open_time']);?></td>
			</tr>
			<tr style="display:none">
				<td class="wdb20 alignr paddingr">激活币</td>
				<td class="alignl paddingl">
					<?php echo $rs['active_coin'];?>&nbsp;&nbsp;&nbsp;&nbsp;
					<span style="display:inline-block;" id="jiaactive">点此增加+</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<span style="display:inline-block;" id="jianactive">点此减小-</span>
				</td>
			</tr>
			<tr id="jiaashow" style="display:none">
				<td class="wdb20 alignr paddingr">增加激活币</td>
				<td class="alignl paddingl"><input class="thconfig wd200" type="text" name="plusactive" id="plusactive" /></td>
			</tr>
			<tr id="jianashow" style="display:none">
				<td class="wdb20 alignr paddingr">减小激活币</td>
				<td class="alignl paddingl"><input class="thconfig wd200" type="text" name="minuactive" id="minuactive" /></td>
			</tr>
			<tr>
				<td class="wdb20 alignr paddingr">直推人数</td>
				<td class="alignl paddingl"><?php echo $rs['recommend_unum'];?></td>
			</tr>
			<tr>
				<td class="wdb20 alignr paddingr">推荐人</td>
				<td class="alignl paddingl"><?php echo $member->getuserid($rs['introducer_id']);?></td>
			</tr>
			<tr style="display:none">
				<td class="wdb20 alignr paddingr">消费劵</td>
				<td class="alignl paddingl">
					<?php echo $rs['give_help_coin'];?>&nbsp;&nbsp;&nbsp;&nbsp;
					<span style="display:inline-block;" id="jiahelp">点此增加+</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<span style="display:inline-block;" id="jianhelp">点此减小-</span>
				</td>
			</tr>
			<tr id="jiahelpshow" style="display:none">
				<td class="wdb20 alignr paddingr">增加排单币</td>
				<td class="alignl paddingl"><input class="thconfig wd200" type="text" name="plushelp" id="plushelp" /></td>
			</tr>
			<tr id="jianhelpshow" style="display:none">
				<td class="wdb20 alignr paddingr">减小排单币</td>
				<td class="alignl paddingl"><input class="thconfig wd200" type="text" name="minuhelp" id="minuhelp" /></td>
			</tr>
			<tr>
				<td class="wdb20 alignr paddingr">总金额</td>
				<td class="alignl paddingl"><?php echo $rs['cash_purse']+$rs['lixi_crash']+$rs['cash_ldprize']+$rs['rise_crash']+$rs['fuxiao_crash'];?></td>
			</tr>
			<tr>
				<td class="wdb20 alignr paddingr">本金</td>
				<td class="alignl paddingl">
					<?php echo $rs['cash_purse'];?>&nbsp;&nbsp;&nbsp;&nbsp;
					<span style="display:inline-block;" id="jiacash">点此增加+</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<span style="display:inline-block;" id="jiancash">点此减小-</span>
				</td>
			</tr>
			<tr id="jiashow" style="display:none">
				<td class="wdb20 alignr paddingr">增加余额</td>
				<td class="alignl paddingl"><input class="thconfig wd200" type="text" name="pluscash" id="pluscash" /></td>
			</tr>
			<tr id="jianshow" style="display:none">
				<td class="wdb20 alignr paddingr">减小余额</td>
				<td class="alignl paddingl"><input class="thconfig wd200" type="text" name="minuscash" id="minuscash" /></td>
			</tr>
			<tr>
				<td class="wdb20 alignr paddingr">真实姓名</td>
				<td class="alignl paddingl">
					<?php echo the_input(array('username',$rs['real_name'],'wd400'),1);?>
				</td>
			</tr>
			<tr>
				<td class="wdb20 alignr paddingr">团队收益</td>
				<td class="alignl paddingl">
					<?php echo $rs['keyong_ldprize'];?>&nbsp;&nbsp;&nbsp;&nbsp;
					<span style="display:inline-block;" id="jialdprize">点此增加+</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<span style="display:inline-block;" id="jianldprize">点此减小-</span>
				</td>
			</tr>
			<tr id="jialdpshow" style="display:none">
				<td class="wdb20 alignr paddingr">增加余额</td>
				<td class="alignl paddingl"><input class="thconfig wd200" type="text" name="plusldprize" id="plusldprize" /></td>
			</tr>
			<tr id="jianldpshow" style="display:none">
				<td class="wdb20 alignr paddingr">减小余额</td>
				<td class="alignl paddingl"><input class="thconfig wd200" type="text" name="minusldprize" id="minusldprize" /></td>
			</tr>


			<tr>
				<td class="wdb20 alignr paddingr">利息</td>
				<td class="alignl paddingl">
					<?php echo $rs['lixi_crash'];?>&nbsp;&nbsp;&nbsp;&nbsp;
					<span style="display:inline-block;" id="jialixi">点此增加+</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<span style="display:inline-block;" id="jianlixi">点此减小-</span>
				</td>
			</tr>
			<tr id="jialxshow" style="display:none">
				<td class="wdb20 alignr paddingr">增加余额</td>
				<td class="alignl paddingl"><input class="thconfig wd200" type="text" name="pluslixi" id="pluslixi" /></td>
			</tr>
			<tr id="jianlxshow" style="display:none">
				<td class="wdb20 alignr paddingr">减小余额</td>
				<td class="alignl paddingl"><input class="thconfig wd200" type="text" name="minuslixi" id="minuslixi" /></td>
			</tr>


			<tr>
				<td class="wdb20 alignr paddingr"> 比特币</td>
				<td class="alignl paddingl">
					<?php echo $rs['btc_account'];?>&nbsp;&nbsp;&nbsp;&nbsp;
					<span style="display:inline-block;" id="jiajinji">点此增加+</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<span style="display:inline-block;" id="jianjinji">点此减小-</span>
				</td>
			</tr>
			<tr id="jiajjshow" style="display:none">
				<td class="wdb20 alignr paddingr">增加余额</td>
				<td class="alignl paddingl"><input class="thconfig wd200" type="text" name="plusjinji" id="plusjinji" /></td>
			</tr>
			<tr id="jianjjshow" style="display:none">
				<td class="wdb20 alignr paddingr">减小余额</td>
				<td class="alignl paddingl"><input class="thconfig wd200" type="text" name="minusjinji" id="minusjinji" /></td>
			</tr>


			<tr>
				<td class="wdb20 alignr paddingr">莱特币</td>
				<td class="alignl paddingl">
					<?php echo $rs['ltc_account'];?>&nbsp;&nbsp;&nbsp;&nbsp;
					<span style="display:inline-block;" id="jiajifen">点此增加+</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<span style="display:inline-block;" id="jianjifen">点此减小-</span>
				</td>
			</tr>
			<tr id="jiajfshow" style="display:none">
				<td class="wdb20 alignr paddingr">增加余额</td>
				<td class="alignl paddingl"><input class="thconfig wd200" type="text" name="plusjifen" id="plusjifen" /></td>
			</tr>
			<tr id="jianjfshow" style="display:none">
				<td class="wdb20 alignr paddingr">减小余额</td>
				<td class="alignl paddingl"><input class="thconfig wd200" type="text" name="minusjifen" id="minusjifen" /></td>
			</tr>


			<tr style="display:none">
				<td class="wdb20 alignr paddingr">赠送积分</td>
				<td class="alignl paddingl">
					<?php echo $rs['fuxiao_crash'];?>&nbsp;&nbsp;&nbsp;&nbsp;
					<span style="display:inline-block;" id="jiadfc">点此增加+</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<span style="display:inline-block;" id="jiandfc">点此减小-</span>
				</td>
			</tr>
			<tr id="jiadfcshow" style="display:none">
				<td class="wdb20 alignr paddingr">增加余额</td>
				<td class="alignl paddingl"><input class="thconfig wd200" type="text" name="plusdfc" id="plusdfc" /></td>
			</tr>
			<tr id="jiandfcshow" style="display:none">
				<td class="wdb20 alignr paddingr">减小余额</td>
				<td class="alignl paddingl"><input class="thconfig wd200" type="text" name="minusdfc" id="minusdfc" /></td>
			</tr>
			<tr>
				<td class="wdb20 alignr paddingr">转出地址</td>
				<td class="alignl paddingl">
					<input class="thconfig" type="text" style="width: 400px;" name="bgy_address" id="bgy_address"  value="<?php echo $rs['bgy_address']?>"/>
				</td>
			</tr>
			<tr>
				<td class="wdb20 alignr paddingr">转入地址</td>
				<td class="alignl paddingl">
					<input class="thconfig" style="width: 400px;" type="text" name="xfb_address" id="xfb_address" value="<?php echo $rs['xfb_address']?>" />
				</td>
			</tr>





			<?php foreach($rr as $k => $v){ ?>
				<input type="hidden" name="ptd[]" value="<?php echo $v['field_name'];?>">
				<?php if($v['input_type']==0){ ?>
					<tr>
						<td class="wdb20 alignr paddingr"><?php echo $v['field_meaning'];?></td>
						<td class="alignl paddingl">
							<?php echo the_input(array($v['field_name'],tautoinfo($v['field_name'],$rs),'wd400'),1);?>
						</td>
					</tr>
				<?php }elseif($v['input_type']==2){ ?>
					<?php if($v['field_name']=='rgmbq'){ ?>
						<tr>
							<td class="wdb20 alignr paddingr"><?php echo $v['field_meaning'];?></td>
							<td class="alignl paddingl"><?php echo $rgform['mbq'];?></td>
						</tr>
					<?php } ?>
				<?php }elseif($v['input_type']==3){ ?>
						<tr>
							<td class="wdb20 alignr paddingr"><?php echo $v['field_meaning'];?></td>
							<td class="alignl paddingl">
								<input type="text" name="<?php echo $v['field_name'];?>" value="" class="thconfig wd400">
							</td>
						</tr>
				<?php } ?>
			<?php } ?>
			<?php if(!empty($rs['freezed_reason'])){ ?>
				<tr>
					<td class="wdb20 alignr paddingr">封号原因</td>
					<td class="alignl paddingl">
						<?php echo $rs['freezed_reason'];?>
					</td>
				</tr>
			<?php } ?>
			<?php if(!empty($rs['freezed_time'])){ ?>
				<tr>
					<td class="wdb20 alignr paddingr">封号时间</td>
					<td class="alignl paddingl">
						<?php echo date("Y-m-d h:i:s",$rs['freezed_time']);?>
					</td>
				</tr>
			<?php } ?>
		</table>
	</form>
</div>
<script type="text/javascript">
$("#jiacash").click(function(){
	$("#jiashow").toggle(300);
});
$("#jiancash").click(function(){
	$("#jianshow").toggle(300);
});
$("#pluscash").focus(function(){
	$("#minuscash").val("");
});
$("#minuscash").focus(function(){
	$("#pluscash").val("");
});
$("#jialdprize").click(function(){
	$("#jialdpshow").toggle(300);
});
$("#jianldprize").click(function(){
	$("#jianldpshow").toggle(300);
});

//5个钱包
$("#jialixi").click(function(){
	$("#jialxshow").toggle(300);
});
$("#jianlixi").click(function(){
	$("#jianlxshow").toggle(300);
});
$("#jiajinji").click(function(){
	$("#jiajjshow").toggle(300);
});
$("#jianjinji").click(function(){
	$("#jianjjshow").toggle(300);
});
$("#jiajifen").click(function(){
	$("#jiajfshow").toggle(300);
});
$("#jianjifen").click(function(){
	$("#jianjfshow").toggle(300);
});
$("#jiadfc").click(function(){
	$("#jiadfcshow").toggle(300);
});
$("#jiandfc").click(function(){
	$("#jiandfcshow").toggle(300);
});
//结束
$("#plusldprize").focus(function(){
	$("#minusldprize").val("");
});
$("#minusldprize").focus(function(){
	$("#plusldprize").val("");
});
//开始
$("#pluslixi").focus(function(){
	$("#minuslixi").val("");
});
$("#minuslixi").focus(function(){
	$("#pluslixi").val("");
});
$("#plusjifen").focus(function(){
	$("#minusjifen").val("");
});$("#minusjifen").focus(function(){
	$("#plusjifen").val("");
});

$("#plusjinji").focus(function(){
	$("#minusjinji").val("");
});$("#minusjinji").focus(function(){
	$("#plusjinji").val("");
});

$("#plusdfc").focus(function(){
	$("#minusdfc").val("");
});$("#minusdfc").focus(function(){
	$("#plusdfc").val("");
});
//结束
$("#jiaactive").click(function(){
	$("#jiaashow").toggle(300);
});
$("#jianactive").click(function(){
	$("#jianashow").toggle(300);
});
$("#plusactive").focus(function(){
	$("#minuactive").val("");
});
$("#minuactive").focus(function(){
	$("#plusactive").val("");
});
$("#jiahelp").click(function(){
	$("#jiahelpshow").toggle(300);
});
$("#jianhelp").click(function(){
	$("#jianhelpshow").toggle(300);
});
$("#plushelp").focus(function(){
	$("#minuhelp").val("");
});
$("#minuhelp").focus(function(){
	$("#plushelp").val("");
});
function validate(){
	var pluscash = $("#pluscash").val();
	var minuscash = $("#minuscash").val();
	if(parseFloat(pluscash) > 0 && parseFloat(minuscash) > 0){
		alert("一次只能做增加或减少中的一个操作！");
		return false;
	}
	var plusldprize = $("#plusldprize").val();
	var minusldprize = $("#minusldprize").val();
	if(parseFloat(plusldprize) > 0 && parseFloat(minusldprize) > 0){
		alert("一次只能做增加或减少中的一个操作！");
		return false;
	}
	var plusactive = $("#plusactive").val();
	var minuactive = $("#minuactive").val();
	if(parseFloat(plusactive) > 0 && parseFloat(minuactive) > 0){
		alert("一次只能做增加或减少中的一个操作！");
		return false;
	}
	var plushelp = $("#plushelp").val();
	var minuhelp = $("#minuhelp").val();
	if(parseFloat(plushelp) > 0 && parseFloat(minuhelp) > 0){
		alert("一次只能做增加或减少中的一个操作！");
		return false;
	}
}
</script>